const common = require('./common');

const url = {
  getParentOrgnation: "/zgb/v1/roster/getParentOrgnation", //获取第一级组织机构
  getOrgnationByParent: "/zgb/v1/roster/getOrgnationByParent", //获取子组织机构
  listPageRosterByOrgnation: "/zgb/v1/roster/listPageRosterByOrgnation", //获取组织机构下的人员(分页)
  getDetail: "/zgb/v1/roster/getDetail", //获取人员详情
  getCareer: "/zgb/v1/roster/getCareer", //获取职业生涯
  listPageExamine: "/zgb/v1/roster/listPageExamine", //获取审批列表
  getExamineDetail: "/zgb/v1/roster/getExamineDetail", //获取审批详情
  examine: "/zgb/v1/roster/examine", //审批
  getStation: "/zgb/v1/roster/getStation", //获取岗位可选属性
  getWorktype: "/zgb/v1/roster/getWorktype", //获取工种可选属性
  getOrgnationTree: "/zgb/v1/roster/getOrgnationTree", //获取组织结构(包含所有的类型)
  getArea: "/zgb/v1/roster/getArea", //获取区域信息
  getPropertiesForChoose: "/zgb/v1/roster/getPropertiesForChoose", //获取可选属性
  modify: "/zgb/v1/roster/modify", //修改人员信息
  improve: "/zgb/v1/roster/improve", //完善信息
  checkAge: "/zgb/v1/roster/checkAge", //判断年龄是否合格
  distinguish: "/zgb/v1/roster/distinguish", //身份证识别
  getRosterByIdentityNumber: "/zgb/v1/roster/getRosterByIdentityNumber", //通过身份证查询人员
  multiExamine: "/zgb/v1/roster/multiExamine", //批量审批
  getExamineFlag: "/zgb/v1/roster/getExamineFlag", //获取修改人员是否需要审批标志
  getRosterCode: "/zgb/v1/roster/getRosterCode", //获取工友码
  resolveScene: "/zgb/v1/roster/resolveScene", //解析工友码页面参数
  checkManager: "/zgb/v1/roster/checkManager", //判断是否是管理人员
  underReviewCount: "/zgb/v1/roster/underReviewCount", //获取花名册待审批数量
  getTrainRecord: "/zgb/v1/roster/getTrainRecord", //获取教育培训
  getSalaryDetailList: "/zgb/v1/roster/getSalaryDetailList", //获取工资流水记录
  checkWarningConfig: "/zgb/v1/roster/checkWarningConfig", //检查预警配置
  listPageApprovalReject: "/zgb/v1/roster/listPageApprovalReject", //获取我提交的被拒审批列表
  getApprovalDetail: "/zgb/v1/roster/getApprovalDetail", //获取审批被拒详情
}
const getParentOrgnation = (data) => {
  return common.req(url.getParentOrgnation, data, 'post', true);
}
const getOrgnationByParent = (data) => {
  return common.req(url.getOrgnationByParent, data);
}
const listPageRosterByOrgnation = (data) => {
  return common.req(url.listPageRosterByOrgnation, data);
}
const getDetail = (data) => {
  return common.req(url.getDetail, data, 'get');
}
const getCareer = (data) => {
  return common.req(url.getCareer, data, 'get');
}
const listPageExamine = (data) => {
  return common.req(url.listPageExamine, data, 'post', true);
}
const getExamineDetail = (data) => {
  return common.req(url.getExamineDetail, data, 'get');
}
const examine = (data) => {
  return common.req(url.examine, data);
}
const getStation = (data) => {
  return common.req(url.getStation, data, 'get');
}
const getWorktype = (data) => {
  return common.req(url.getWorktype, data, 'get');
}
const getOrgnationTree = (data) => {
  return common.req(url.getOrgnationTree, data, 'get');
}
const improve = (data) => {
  return common.req(url.improve, data, 'post', false, false);
}
const getArea = (data) => {
  return common.req(url.getArea, data, 'get');
}
const checkAge = (data) => {
  return common.req(url.checkAge, data, 'get');
}
const getPropertiesForChoose = (data) => {
  return common.req(url.getPropertiesForChoose, data, 'get');
}
const distinguish = (data) => {
  return common.req(url.distinguish, data);
}
const getRosterByIdentityNumber = (data) => {
  return common.req(url.getRosterByIdentityNumber, data, 'get', true, false);
}
const multiExamine = (data) => {
  return common.req(url.multiExamine, data);
}
const getExamineFlag = (data) => {
  return common.req(url.getExamineFlag, data, 'get');
}
const modify = (data) => {
  return common.req(url.modify, data, 'post', true, false);
}
const getRosterCode = (data) => {
  return common.req(url.getRosterCode, data, 'post', true);
}
const resolveScene = (data) => {
  return common.req(url.resolveScene, data, 'get', false, false);
}
const checkManager = (data) => {
  return common.req(url.checkManager, data, 'get', false, false);
}
const underReviewCount = (data) => {
  return common.req(url.underReviewCount, data);
}
const getTrainRecord = (data) => {
  return common.req(url.getTrainRecord, data);
}
const getSalaryDetailList = (data) => {
  return common.req(url.getSalaryDetailList, data);
}
const checkWarningConfig = (data) => {
  return common.req(url.checkWarningConfig, data);
}
const listPageApprovalReject = (data) => {
  return common.req(url.listPageApprovalReject, data);
}
const getApprovalDetail = (data) => {
  return common.req(url.getApprovalDetail, data, 'get');
}

export default {
  getParentOrgnation,
  getOrgnationByParent,
  listPageRosterByOrgnation,
  getDetail,
  getCareer,
  listPageExamine,
  getExamineDetail,
  examine,
  getStation,
  getWorktype,
  getOrgnationTree,
  modify,
  improve,
  getArea,
  checkAge,
  getPropertiesForChoose,
  distinguish,
  getRosterByIdentityNumber,
  multiExamine,
  getExamineFlag,
  getRosterCode,
  resolveScene,
  checkManager,
  underReviewCount,
  getTrainRecord,
  getSalaryDetailList,
  checkWarningConfig,
  listPageApprovalReject,
  getApprovalDetail
}